/*
 * Copyright (c) 2009 Enio Perpetuo
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 * 		http://www.apache.org/licenses/LICENSE-2.0
 *  
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 *  
 */
package co.za.gvi.message;

/**
 * This class represents the message generated by a user and it is 
 * passed as a parameter to the <code>IncomeMessageHandler</code> 
 * by the call-back post.
 * 
 * @see co.za.gvi.handler.IncomeMessageHandler
 * 
 * @author Enio Perpetuo
 */
public class SmsMessage {
	
	private String smsDateTime;
	private String gatewayIdentifier;
	private String cellNumber;
	private String smsLocation;
	private String content;
	
	/**
	 * @return the smsDateTime
	 */
	public String getSmsDateTime() {
		return smsDateTime;
	}


	/**
	 * @param smsDateTime the smsDateTime to set
	 */
	public void setSmsDateTime(String smsDateTime) {
		this.smsDateTime = smsDateTime;
	}


	/**
	 * @return the gatewayIdentifier
	 */
	public String getGatewayIdentifier() {
		return gatewayIdentifier;
	}


	/**
	 * @param gatewayIdentifier the gatewayIdentifier to set
	 */
	public void setGatewayIdentifier(String gatewayIdentifier) {
		this.gatewayIdentifier = gatewayIdentifier;
	}


	/**
	 * @return the cellNumber
	 */
	public String getCellNumber() {
		return cellNumber;
	}


	/**
	 * @param cellNumber the cellNumber to set
	 */
	public void setCellNumber(String cellNumber) {
		this.cellNumber = cellNumber;
	}


	/**
	 * @return the smsLocation
	 */
	public String getSmsLocation() {
		return smsLocation;
	}


	/**
	 * @param smsLocation the smsLocation to set
	 */
	public void setSmsLocation(String smsLocation) {
		this.smsLocation = smsLocation;
	}


	/**
	 * @return the content
	 */
	public String getContent() {
		return content;
	}


	/**
	 * @param content the content to set
	 */
	public void setContent(String content) {
		this.content = content;
	}


	@Override
	public String toString() {
		String separator = "\n\t";
		String openBracket = "{\n\t";
		String closeBracket = "\n}";
		StringBuilder builder = new StringBuilder();

		builder.append(openBracket);
		builder.append("Sms Date Time: ");
		builder.append(this.smsDateTime);
		builder.append(separator);
		builder.append("Gateway Identifier: ");
		builder.append(this.gatewayIdentifier);
		builder.append(separator);
		builder.append("Cell Number: ");
		builder.append(this.cellNumber);
		builder.append(separator);
		builder.append("Sms Location: ");
		builder.append(this.smsLocation);
		builder.append(separator);
		builder.append("Content: ");
		builder.append(this.content);
		builder.append(closeBracket);
		
		return builder.toString();
	}
}
